1. Field of the Invention
The present invention generally relates to an image data coding system, and in particular to method and apparatus for coding an image including repeatedly usable patterns using a pattern matching technique.
2. Description of the Related Art
There have been proposed several image coding or compression techniques using pattern matching. For example, see "Lossless and Lossy Compression of Text Images by Soft Pattern Matching" by Paul G. Howard ("Coding of Still Pictures" ISO/IEC JTC 1/SC 29/WG1, Jun. 30, 1995). According to the conventional compression technique, an input image is segmented into marks or patterns, each of which is compared with the patterns stored in a library. If the current pattern matches one of the patterns of the library, then an index of the matching pattern is coded based on the bitmap and the size of the current pattern and its offset relative of another previously coded pattern.
In the case where pixels surrounding the current pattern are predicted in value (black or white), a differential value between the current pattern and each of reference patterns is calculated where the reference patterns are selected by pattern matching. The reference pattern having the minimum differential value is used for prediction.
However, there is a possibility that the differential value is affected by variations in matching position and thickness of a line of the current pattern. Such variations may cause an erroneous reference pattern to be selected and used for prediction, resulting in inaccurate pattern matching coding.